package com.design.principle.listkovsutlution.simple;

/**
 * @program: designPattern
 * @description:
 * @author: STU756
 * @create: 2021-01-19 01:04
 */
public class SimpleTest {
    public static void resize(Rectangle rectangle) {
        while(rectangle.getWidth() >= rectangle.getHeight()) {
            rectangle.setHeight(rectangle.getHeight()+1);
            System.out.println("Width:" + rectangle.getWidth() +",Height:" + rectangle.getHeight());
        }
        System.out.println("Resize End,width:" + rectangle.getWidth() +",Height:" + rectangle.getHeight());
    }
    public static void main(String[] args) {
//        Rectangle rectangle = new Rectangle();
//        rectangle.setWidth(20);
//        rectangle.setHeight(10);
//        resize(rectangle);

        Square square = new Square();
        square.setLength(10);
        resize(square);
    }
}
